# XSL-FO region-start Object

## Definition and Usage

The <fo:region-start> object defines the left region of a page (left sidebar).

XSL-FO uses the following elements to define the regions of a page:

- <fo:region-body> defines the body region
- <fo:region-before> defines the top region (header)
- <fo:region-after> defines the bottom region (footer)
- <fo:region-start> defines the left region (left sidebar)
- <fo:region-end> defines the right region (right sidebar)

Note: region-before, region-after, region-start, and region-end is a part of the region-body. To avoid text in the region-body to overwrite text in the other regions, the region-body must have margins at least the size of these regions.

Note: According to version 1.0 of the XSL-FO Recommendation, the padding and border-width properties must be 0.

## Syntax

<fo:region-start>
<!--
Contents:EMPTY
-->
</fo:region-start>

## Properties

Property [A-B] | Property [C-Z]
--- | ---
background-attachment | clip
background-color | display-align
background-image | extent
background-repeat | overflow
background-position-horizontal | padding-after
background-position-vertical | padding-before
border-after-color | padding-bottom
border-after-style | padding-end
border-after-width | padding-left
border-before-color | padding-right
border-before-style | padding-start
border-before-width | padding-top
border-bottom-color | region-name
border-bottom-style | reference-orientation
border-bottom-width | writing-mode
border-end-color |
border-end-style |
border-end-width |
border-left-color |
border-left-style |
border-left-width |
border-right-color |
border-right-style |
border-right-width |
border-start-color |
border-start-style |
border-start-width |
border-top-color |
border-top-style |
border-top-width |

### Example 1

XSL-FO uses page templates called "Page Masters" to define the layout of pages. Each template must have a unique name:

<fo:simple-page-master master-name="intro">
<fo:region-body margin="5in" />
</fo:simple-page-master>
<fo:simple-page-master master-name="left">
<fo:region-body margin-left="2in" margin-right="3in" />
</fo:simple-page-master>
<fo:simple-page-master master-name="right">
<fo:region-body margin-left="3in" margin-right="2in" />
</fo:simple-page-master>

In the example above, three <fo:simple-page-master> elements, define three different templates. Each template (page-master) has a different name.

The first template is called "intro". It could be used as a template for introduction pages.

The second and third templates are called "left" and "right". They could be used as templates for even and odd page numbers.

### Example 2

This is an extract from an XSL-FO document:

<fo:simple-page-master master-name="A4"
page-width="297mm" page-height="210mm"
margin-top="1cm" margin-bottom="1cm"
margin-left="1cm" margin-right="1cm">
<fo:region-body margin="3cm"/>
<fo:region-before extent="2cm"/>
<fo:region-after extent="2cm"/>
<fo:region-start extent="2cm"/>
<fo:region-end extent="2cm"/>
</fo:simple-page-master>

The code above defines a "Simple Page Master Template" with the name "A4".

The width of the page is 297 millimeters and the height is 210 millimeters.

The top, bottom, left, and right margins of the page are all 1 centimeter.

The body has a 3 centimeter margin (on all sides).

The before, after, start, and end regions (of the body) are all 2 centimeters.

The width of the body in the example above can be calculated by subtracting the left and right margins and the region-body margins from the width of the page itself:

297mm - (2 x 1cm) - (2 x 3cm) = 297mm - 20mm - 60mm = 217mm.

Note that the regions (region-start and region-end) are not a part of the calculation. As described earlier, these regions are parts of the body.

### WEB HOSTING

UK Reseller Hosting

### WEB BUILDING

FREE Website BUILDER Free HTML5 Templates

### W3SCHOOLS EXAMS

HTML, CSS, JavaScript, PHP, jQuery, XML, and ASP Certifications

### SHARE THIS PAGE

### Color Picker

### HTML/CSS

HTML Tutorial HTML5 Tutorial CSS Tutorial CSS3 Tutorial Bootstrap Tutorial

### JavaScript

JavaScript Tutorial jQuery Tutorial jQuery Mobile Tutorial AngularJS Tutorial AJAX Tutorial JSON Tutorial

### Graphics

Canvas Tutorial SVG Tutorial Google Maps Tutorial

### Server Side

SQL Tutorial PHP Tutorial ASP Tutorial ASP.NET Tutorial VBScript Tutorial AppML Tutorial

### Web

Web Building Web Statistics Web Certification

### XML

XML Tutorial DTD Tutorial Schema Tutorial XML DOM Tutorial XPath Tutorial XSLT Tutorial XQuery Tutorial XSL-FO Tutorial RSS Tutorial WSDL Tutorial

### HTML/CSS

HTML Tag Reference HTML Event Reference HTML Color Reference CSS 1,2,3 Reference Bootstrap Reference

### JavaScript

JavaScript Reference HTML DOM Reference jQuery Reference jQuery Mobile Reference Google Maps Reference

### Server Side

PHP Reference SQL Reference ASP Reference VBScript Reference Razor Reference ASP.NET Reference

### XML

XML DOM Reference XSLT Reference XSL-FO Reference XPath Reference XQuery Reference Schema Reference RSS Reference SVG Reference

### HTML Charsets

HTML Character Sets HTML ASCII HTML ANSI HTML Windows-1252 HTML ISO-8859-1 HTML Symbols HTML UTF-8

### HTML/CSS

HTML Examples CSS Examples

### Browser Scripting

JavaScript Examples HTML DOM Examples jQuery Examples jQuery Mobile Examples AngularJS Examples AJAX Examples

### Server Scripting

PHP Examples ASP Examples VBScript Examples Razor Examples .NET Examples

### XML Languages

XML Examples DTD Examples XML DOM Examples XSL Examples XSLT Examples XPath Examples XQuery Examples Schema Examples RSS Examples SVG Examples